<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML5实现拖拽</title>
    <link href="main.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="box">
        <div class="drag" draggable="true">
            <table>
                <caption>这里是个表单</caption>
                <thead>
                    <tr>
                        <th>列1</th>
                        <th>列2</th>
                        <th>列3</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <th>1</th>
                        <td>数据1-1</td>
                        <td>数据1-2</td>
                    </tr>
                    <tr>
                        <th>2</th>
                        <td>数据2-1</td>
                        <td>数据2-2</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>

    <script src="index.js" type="text/javascript"></script>
</body>

</html>